package com.kexio.file.storage;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 存储元信息
 * 
 * @author kexio
 */
public class StorageMetadata {
    
    /** 文件大小 */
    private Long size;
    
    /** 内容类型 */
    private String contentType;
    
    /** ETag */
    private String etag;
    
    /** 最后修改时间 */
    private LocalDateTime lastModified;
    
    /** 自定义元数据 */
    private Map<String, String> customMetadata;

    // ==================== 构造函数 ====================
    
    public StorageMetadata() {}

    public StorageMetadata(Long size, String contentType, String etag, LocalDateTime lastModified) {
        this.size = size;
        this.contentType = contentType;
        this.etag = etag;
        this.lastModified = lastModified;
    }

    // ==================== Getter/Setter方法 ====================
    
    public Long getSize() { return size; }
    public void setSize(Long size) { this.size = size; }

    public String getContentType() { return contentType; }
    public void setContentType(String contentType) { this.contentType = contentType; }

    public String getEtag() { return etag; }
    public void setEtag(String etag) { this.etag = etag; }

    public LocalDateTime getLastModified() { return lastModified; }
    public void setLastModified(LocalDateTime lastModified) { this.lastModified = lastModified; }

    public Map<String, String> getCustomMetadata() { return customMetadata; }
    public void setCustomMetadata(Map<String, String> customMetadata) { this.customMetadata = customMetadata; }
}
